var World=Class.extend({
	ballView:null,
	palka1View:null,
	palka2View:null,
	elem:null,
	score:null,
	destroy:function(){
		this.ballView.destroy();
		this.palka1View.destroy();
		this.palka2View.destroy();
		this.score.destroy();
	},
	init:function(x,y,z){
		this.elem=$('#gameBoard');
		this.ballView=new BallView(x);
		this.elem.append(this.ballView.div);
		this.palka1View=new PalkaView(y);
		this.elem.append(this.palka1View.div);
		this.palka2View=new PalkaView(z);
		this.palka2View.div.css({
			'-ms-transform':'rotate(180deg)',
			'-o-transform':'rotate(180deg)',
			'-webkit-transform':'rotate(180deg)',
			'-moz-transform':'rotate(180deg)'
		});
		this.elem.append(this.palka2View.div);
		this.score=new Score();
		this.elem.append(this.score.elem);
		this.upDate();
	},
	upDate:function(){
		this.ballView.updatePosition();
		this.palka1View.updatePosition();
		this.palka2View.updatePosition();
	}
});
